// C11:UnresponsiveUI.cpp {RunByHand}
//  Lack of threading produces an unresponsive UI.
//  {L} ZThread
#include "zthread/Thread.h"
#include <fstream>
#include <iostream>
#include <string>
#include <tuple>

using namespace std;
using namespace ZThread;

int main(void) {
  cout << "Press <Enter> to quit:" << endl;
  ifstream file("UnresponsiveUI.cpp");
  string line;
  while (getline(file, line)) {
    cout << line << endl;
    Thread::sleep(1000); // Time in milliseconds
  }
  // Read input from the console
  cin.get();
  cout << "Shutting down..." << endl;
}